package com.fc.redap.validate;

import com.fc.redap.dtos.ResponseJson;
import com.fc.redap.exception.ResponseException;
import com.fc.redap.helper.StringUtils;

public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new ResponseException(message, ResponseJson.BAD_REQUEST);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new ResponseException(message, ResponseJson.BAD_REQUEST);
        }
    }
}
